package cn.itcast.dmp.tags
import org.apache.commons.lang3.StringUtils
import org.apache.spark.sql.Row

object Tags4AppMaker extends TagsMaker {
  override def make(row: Row, dic: Map[String, String]): Map[String, Double] = {
    val appId = row.getAs[String]("appid")
    // 通过字段获取值
    val appName = dic.getOrElse(appId,"")


    if(StringUtils.isNotBlank(appName)){
      Map(s"APP@$appName" -> 1.0)
    }else {
      Map[String, Double]()
    }

  }
}
